AMT coverage: g4-dotrainsourcev1-hash-fet - #183
Conversation
… propagation AMT survivors S01/S04/S06: hash() pinned to independent Keccak-256 reference vectors; fetch_by_subject pinned to take the first decoded item of the first meta; non-Empty subgraph client errors pinned to surface as Err(MetaboardSubgraphClientError), never Ok(None). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AMT survivor O03: extract_from_meta must recurse into a decoded item whose magic is RainMetaDocumentV1 and whose payload is itself a complete prefixed document. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AMT survivors R02/R07/R15/R16/R17/R18: to_meta_item envelope pinned field by field; TryFrom pinned to unpack() (deflate honoured) and to reject non-URL payloads with InvalidUrl; parse/gate/utf8 error variants pinned in place in the existing tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AMT survivors P01-P20 (previously zero-covered unit): BitInteger 0..=15 bounds, BitIntegerRange order check, OperandArgRange Exact/Range semantics, OpMeta serde defaults and nested validation, Input bits/computation validation, InputParameter.spread default, TryFrom validate gate and content-encoding unpack. Deliberately NOT pinned: BitIntegerRange per-end bounds and Output::Computed sub-validation rejections - both are currently dropped by a merge_all misuse (child errors are not Struct-kind under the merge field), so pinning either outcome would encode the bug; NOTE comments in the tests point at the audit issue. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AMT survivors I01-I09 (previously zero-covered unit): deny_unknown_fields pinned at all six struct levels; methods min 1, Method.inputs min 1, Expression.context_columns max 255. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 33 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adversarial mutation-test coverage for group
g4-dotrainsourcev1-hash-fet(30 behaviours across 6 units), at scanned commit bba50a7.Method: every behaviour was first probed as one or more exact-string mutants against the PRE-EXISTING suite (attribution pass, no new tests present); survivors then got new tests, or existing tests strengthened in place; everything re-probed until killed — or, for three mutants, shown to be behaviourally equivalent consequences of a filed defect (#173). Adversarial findings were filed as issues labelled
audit+adversarialand are linked below; tests pin only behaviour derived from the intent oracles, never buggy output.Behaviour matrix
Verdict legend: PRE = killed by a pre-existing test (attribution pass), NEW = killed by a test added here, STR = killed by a pre-existing test strengthened in place here, SURVIVES = equivalent mutant, unkillable until the linked issue is resolved.
DotrainSourceV1 (
crates/cli/src/meta/types/dotrain/source_v1.rs)test_hash_known_keccak256_vectors(independent Keccak-256 reference vectors)0xprefixtest_fetch_by_subject_sends_0x_prefixed_hextest_fetch_by_subject_found(+_invalid_cbor,_wrong_magic)test_fetch_by_subject_takes_first_decoded_itemtest_fetch_by_subject_not_foundtest_fetch_by_subject_propagates_non_empty_client_errorstest_into_document(+roundtrips)test_into_documenttest_try_from_document_invalid_magic(+_success, roundtrips)test_try_from_document_invalid_magic(+test_fetch_by_subject_wrong_magic)test_try_from_document_invalid_utf8OrderBuilderStateV1 (
crates/cli/src/meta/types/dotrain/order_builder_state_v1.rs)test_get_token_addressestest_get_vault_idstest_extract_from_meta_nested_rain_documenttest_extract_from_meta_found(+_not_found,_multiple_documents,_corrupted_instance_data)test_extract_from_meta_found(+_multiple_documents)test_extract_from_meta_not_foundtest_into_document(+roundtrips)test_into_document(+roundtrips)test_try_from_document_invalid_magic(+_success)test_try_from_document_invalid_magictest_try_from_document_success(+roundtrips)RaindexSignedContextOracleV1 (
crates/cli/src/meta/types/raindex_signed_context_oracle/mod.rs)test_parse_invalid_url(+test_parse_empty_url)test_parse_invalid_url(variant now matched)test_new_with_url(+test_parse_valid_url, roundtrip)test_parsed_urltest_roundtrip(+test_find_in_items)test_roundtrip(+test_find_in_items)test_to_meta_item_fieldstest_roundtrip(+test_find_in_items)test_roundtriptest_roundtriptest_find_in_items(+_decode_error)test_find_in_items_decode_errortest_find_in_items_missingtest_wrong_magic_fails(+roundtrip,test_find_in_items)test_wrong_magic_fails(variant now matched)test_find_in_items_decode_error(variant now matched)test_try_from_unpacks_content_encodingtest_try_from_rejects_non_url_payloadCommon validation newtypes (
crates/cli/src/meta/types/common/v1.rs)^[a-z][0-9a-z-]*$test_rain_symbol_validate^[a-zA-Z$_][a-zA-Z0-9$_]*$test_solidity_identifier_validate^[\s!-~]*$test_rain_string_validate(+authoring roundtrips)test_rain_title_validatetest_rain_title_validate^0x[a-fA-F0-9]{64}$test_hash_patterntest_rain_symbol_validatetest_rain_title_validatetest_rain_string_validatetest_solidity_identifier_validateOpMeta v1 (
crates/cli/src/meta/types/op/v1.rs)test_bit_integer_boundstest_bit_integer_range_ordertest_operand_arg_range_exact_is_valid<test_operand_arg_range_min_max(equal bounds pinned valid)Operandderives Validate with no constraints, and merge_all drops children anyway — doubly unobservable; see the merge_all issuetest_output_validation_accepts_well_formedtest_opmeta_minimal_json_defaultstest_opmeta_try_from_validates;test_opmeta_aliases_validatedtest_opmeta_input_bits_validated(order-violation arm; end-bounds arm blocked by the merge_all bug)test_opmeta_input_computation_validatedtest_input_parameter_spread_defaults_falsetest_opmeta_try_from_validatestest_opmeta_try_from_item_unpacks_content_encodingInterpreterCallerMeta v1 (
crates/cli/src/meta/types/interpreter_caller/v1.rs)test_deny_unknown_fields_top_leveltest_deny_unknown_fields_methodtest_deny_unknown_fields_method_inputtest_deny_unknown_fields_expressiontest_deny_unknown_fields_context_columntest_deny_unknown_fields_context_celltest_methods_min_length_onetest_method_inputs_min_length_onetest_context_columns_max_255(255 ok / 256 rejected)QA
cast keccak, regex semantics cross-checked against the regex crate directly; no expected value mirrors the code under testProbe tool:
nix run github:rainlanguage/adversarial-mutation-test#mutation-probeover a 79-mutant exact-string mutants file (kept outside the repo, never committed); suite commandnix develop -c cargo test -p rain-metadata; pass/fail proof read from cargo's own tally; killers attributed from cargo's FAILED lines.P03/P06/P07: mutants behaviourally equivalent under the confirmed merge_all defect (BitIntegerRange/OperandArgRange/Output validation drops all sub-validation errors (ValidationErrors::merge_all misuse) #173) — the sub-validation results they delete are dropped by the current code anyway, so no discriminating test can exist until BitIntegerRange/OperandArgRange/Output validation drops all sub-validation errors (ValidationErrors::merge_all misuse) #173 is resolved. 0 NO-RUN, 0 harness errors.cast keccakcomputation).Issues filed from the adversarial pass (all carrying
audit+adversarial): #155, #158, #159, #162, #165, #167, #171, #173.Deliberately not pinned by tests:
Ok(None)branches infetch_by_subject(metabytes.is_empty(),decoded_items.is_empty()) are unreachable: the subgraph client maps empty result sets toErr(Empty), andcbor_decoderejects zero-item data asCorruptMeta. The guard direction is pinned (S03); the dead bodies cannot be.BitIntegerRange/ sub-validation inOutput— blocked on BitIntegerRange/OperandArgRange/Output validation drops all sub-validation errors (ValidationErrors::merge_all misuse) #173 (pinning the currentOkwould encode the bug).🤖 Generated with Claude Code